home *** CD-ROM | disk | FTP | other *** search
- package symantec.itools.db.net;
-
- import java.io.DataInputStream;
- import java.io.DataOutputStream;
- import java.io.IOException;
- import java.util.Vector;
- import symjava.sql.SQLException;
-
- class ExceptionList extends ServerObject {
- // $FF: renamed from: _e symjava.sql.SQLException
- SQLException field_0;
-
- ExceptionList(SQLException e) {
- this.field_0 = e;
- }
-
- ExceptionList() {
- this.field_0 = new SQLException("");
- }
-
- SQLException getSQLException() {
- return this.field_0;
- }
-
- int getType() {
- return 68;
- }
-
- void read(DataInputStream in) throws SQLException, IOException, ErrorException {
- in.readShort();
- byte[] leader = new byte[4];
- in.readFully(leader, 0, 4);
- ServerObject obj = (ServerObject)NetClass.getNextObject(in);
- this.field_0 = null;
-
- for(SQLException eLast = this.field_0; obj.getType() == 49; obj = (ServerObject)NetClass.getNextObject(in)) {
- NetError error = (NetError)obj;
- SQLException eCurrent = error.toSQLException();
- if (this.field_0 == null) {
- eLast = eCurrent;
- this.field_0 = eCurrent;
- } else {
- eLast.setNextException(eCurrent);
- eLast = eCurrent;
- }
- }
-
- if (obj.getType() != 50) {
- ((ServerObject)this).onObjectError(obj);
- }
-
- }
-
- void write(DataOutputStream out) throws IOException {
- out.writeByte(this.getType());
- out.writeShort(4);
- out.writeBytes("ERR}");
- Vector eList = new Vector();
-
- for(SQLException eCurrent = this.field_0; eCurrent != null; eCurrent = eCurrent.getNextException()) {
- eList.addElement(new NetError((byte)0, eCurrent.getErrorCode(), ((Throwable)eCurrent).getMessage(), eCurrent.getSQLState(), "", "{ERR"));
- }
-
- ServerList list = new ServerList(eList);
- list.write(out);
- }
- }
-